<template>
  <div class="filter-row">
    <column
      v-for="(item, index) in condition.columns"
      :column.sync="item"
      :key="item.fieldName"
      @select-change="(value) => {selectChange(index, value)}">
    </column>
  </div>
</template>

<script>
  import Column from './Column'

  export default {
    components: {
      Column
    },
    props: {
      condition: {
        type: Object,
        default: () => ({
          columns: []
        })
      }
    },
    data() {
      return {

      }
    },
    methods: {
      selectChange(columnIndex, value) {
        console.log(value)
        this.$emit('select-change', columnIndex, value)
      }
    }
  }
</script>

<style lang="scss" scoped>



</style>
